import request from '@/utils/request'

// 查询章节列表
export function listChapter(query) {
	return request({
		url: '/admin/chapter/list',
		method: 'get',
		params: query
	})
}

// 查询章节
export function selectChapter(id) {
	return request({
		url: '/admin/chapter/' + id,
		method: 'get'
	})
}

// 插入章节
export function insertChapter(data) {
	return request({
		url: '/admin/chapter',
		method: 'post',
		data: data
	})
}

// 修改章节
export function updateChapter(data) {
	return request({
		url: '/admin/chapter',
		method: 'put',
		data: data
	})
}

// 删除章节
export function deleteChapter(id) {
	return request({
		url: '/admin/chapter/' + id,
		method: 'delete'
	})
}
